package featuremodel.method;

import featuremodel.FeatureRep;
import skyblue.Method;
import skyblue.SkyBlueDef;
import skyblue.Variable;

public class RequireMethodSetUnbind extends Method {

	private Variable b;

	public RequireMethodSetUnbind(Variable b) {

		this.b = b;

		getOutputs().add(b);

	}

	public void setTobeMethodType() {

		b.setTobemethodtype(SkyBlueDef.METHOD_TYPE_UNBIND);
	}

	public void clearTobeMethodType() {
		b.setTobemethodtype(null);
	}

	public void setTobeMethodType2() {

		b.setTobeMethodType2(SkyBlueDef.METHOD_TYPE_UNBIND);
	}

	public void clearTobeMethodType2() {
		b.setTobeMethodType2(null);
	}

	public void execute() {
		FeatureRep fp = (FeatureRep) b.getValue().getValuerep();
		fp.setBindState(SkyBlueDef.VARIABLE_UNBIND);
		b.setMethodtype(SkyBlueDef.METHOD_TYPE_UNBIND);
		b.setTobemethodtype(null);

	}

	public Variable getB() {
		return b;
	}

	public void setB(Variable b) {
		this.b = b;
	}

}
